package com.btpn.infra.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import org.hibernate.annotations.GenericGenerator;

@MappedSuperclass
public abstract class AEntityString implements Serializable {
	
	/*=============================================== C O N S T A N T =========================================*/
	private static final long serialVersionUID = 410695975631473008L;

	/*=============================================== M E M B E R =============================================*/
	@Id 
	@GeneratedValue(generator="system-uuid")
    @GenericGenerator(name="system-uuid", strategy="uuid2")
	@Column(name = "__SID")
	private String sid;
	
	@Column(name = "__CREATED_BY")
	protected String createdBy;
	
	@Column(name = "__CREATED_DATE")
	protected Date createdDate = new Date();
	
	@Column(name = "__UPDATED_BY")
	protected String updatedBy;
	
	@Column(name = "__UPDATED_DATE")
	protected Date updatedDate;

	/*=============================================== G E T T E R   &   S E T T E R ===========================*/
	public String getSid() {
		return sid;
	}

	public void setSid(String sid) {
		this.sid = sid;
	}

	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public String getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}

	public Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}
}
